import axios from 'axios'

export default {
    /**
     * 获取列表数据
     * @param params
     * @returns {AxiosPromise<any>}
     */
    fetch (params) {
        return axios.get('an/service/courier', {
            params: params
        });
    },
    /**
     * 根据id获取详情
     */
    fetchById(id){
        return axios.get(`an/service/courier/${id}`);
    },
    /**
     * 重置密码
     * @param id
     */
    resetPassword(id){
        return axios.post(`an/service/courier/password`,{courier_id:id})
    },

    /**
     * 删除员工
     * @param id
     * @returns {AxiosPromise<any>}
     */
    destroy(id){
        return axios.delete(`an/service/courier/${id}`);
    },
}
